# -*- coding:utf-8 -*-
# @FileName  :per_common.py
# @Time      :2020/12/15 11:18
# @Author    :Zhoujirong
# @Desc      :
from common.http_request import Request
from biz.support.urls import ServerUrl

class PerCommonRequest:
    @classmethod
    def get_dic(cls,type,cookie):
        '''获取字典值'''
        data = {
            'type':type
        }
        req = Request(ServerUrl.per_common_cpqdic_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def get_deptcodename(cls,type,cookie):
        '''获取机构id和name'''
        data = {
            'type': type
        }
        req = Request(ServerUrl.per_common_getdeptcodename_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def get_orgtree(cls,type,cookie):
        '''获取机构树'''
        data = {
            'type': type
        }
        req = Request(ServerUrl.per_common_orgtree_url, data=data, headers=cookie)
        return req.post()

    @classmethod
    def get_system_name(cls, type, cookie):
        '''获取当前系统名称'''
        data = {
            'type': type
        }
        req = Request(ServerUrl.per_common_system_name_url, data=data, headers=cookie)
        return req.post()



if __name__ == "__main__":
    pass